states = {
    'Oregon':'OR',
    'Florida':'FL',
    'California':'CA',
    'New York':'NY',
    'Michigan':'MI'
}

cities = {
    'CA':'San Francisco',
    'MI':'Detroit',
    'FL':'Jacksonville'
}

cities['NY'] = 'New york'
cities['OR'] = 'Portland'
print('-' * 10)

print("NY state has: ", cities['NY'])
print(cities['OR'])

print('-' * 10)
print(cities[states['Oregon']])
print(cities[states['New York']])

print('-' * 10)
for state, abbrev in list(states.items()):
    print(f"{state} is abbreviated {abbrev}")

print('0' * 20)
for abbrev, city in list(cities.items()):
    print(f"{abbrev} has the city {city}")

print('12' * 20)
for state, abbrev in list(states.items()):
    print(f"{state} state is abbreviated {abbrev}")
    print(f"and has city {cities[abbrev]}")

print('23' * 20)
state = states.get('Texas')

if not state:
    print("Sorry, no Texas.")

city = cities.get('TX', 'Does Not Exist')
print(f"The city for the state 'TX' is {city} ")
